package dbmanagement;

/**
 * Created by IntelliJ IDEA.
 * User: [J0k3r]
 * Date: 26.11.2008
 * Time: 22:47:07
 */
public class FetchedObjectTemplate implements Cloneable {
    private Integer id;
    private String name;
    private Integer rootTemplateId;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getRootTemplateId() {
        return rootTemplateId;
    }

    public void setRootTemplateId(Integer rootTemplateId) {
        this.rootTemplateId = rootTemplateId;
    }

    protected Object clone() throws
            CloneNotSupportedException {
        FetchedObjectTemplate template = new FetchedObjectTemplate();
        template.setId(new Integer(id));
        template.setName(new String(name));
        template.setRootTemplateId(rootTemplateId != null ? new Integer(rootTemplateId) : null);

        return template;
    }
}
